package com.caigou.modules.data.adpter

import com.caigou.modules.data.R
import com.caigou.modules.data.bean.DataItemBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * @author #Suyghur.
 * Created on 2021/12/29
 */
class DataItemAdapter(dataset: MutableList<DataItemBean>) : BaseQuickAdapter<DataItemBean, BaseViewHolder>(R.layout.item_data_list, dataset) {

    override fun convert(holder: BaseViewHolder, item: DataItemBean) {
        holder.setText(R.id.item_data_tv_period, "${item.period}期")
        holder.setText(R.id.item_data_tv_title, item.title)
        holder.setText(R.id.item_data_tv_time, item.createTime)
        holder.setText(R.id.item_data_tv_browse_num, "点击：${item.browseCount}")
        holder.setText(R.id.item_data_tv_comment_num, "评论：${item.replyCount}")
    }
}